
<!DOCTYPE HTML>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Demo: button</title>

	<link rel="stylesheet" href="../libs/dijit/themes/claro/claro.css" media="screen">

</head>
<body class="claro">
	<h1>Demo: button</h1>
	<button id="button1" type="button">Button1</button>
	<button id="button2" data-dojo-type="dijit/form/Button" type="button">Button2</button>
	<button id="button3" data-dojo-type="dijit/form/Button" type="button">
		<span>Button3</span>
		<script type="dojo/on" data-dojo-event="click">
			console.log("I was clicked");
		</script>
	</button>
	<script src="../libs/dojo/dojo.js" data-dojo-config="isDebug: 1, async: 1, parseOnLoad: 1"></script>
		 <script>
        var dojoConfig = {
            async: true,
            baseUrl:'../',
			packages: [  
        	{ name: "dojo", location: "libs/dojo" },  
        	{ name: "dijit", location: "libs/dijit" },  
        	{ name: "dojox", location: "libs/dojox" }
			] 
        };
    </script>
	<script>
	require([
		"dojo/dom",
		"dojo/on",
		"dojo/parser",
		"dijit/registry",
		"dijit/form/Button",
		"dojo/domReady!"
	], function(dom, on, parser, registry){
		var myClick = function(evt){
			
            console.log(evt);
		};

		parser.parse();

		on(dom.byId("button1"), "click", myClick);
		on(registry.byId("button2"), "click", myClick);
	});
	</script>
</body>
</html>
